home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / CAD / PKEY11_1.ARJ / EE.LSP < prev    next >
Text File  |  1992-03-14  |  868b  |  32 lines

  1. (defun ederr (s)
  2. (if (/= s "Function cancelled")(princ (strcat "\nError: " s)))
  3. (setq *error* oer ederr  nil )(princ))
  4. (setq oer  *error*  *error*  ederr)
  5. (setq ss (ssget))
  6. (setq counter 0)
  7. (setq tftemp "tempfil.xxx")
  8. (prompt "Writing text...")
  9. (setq txt(open tftemp "w"))
  10. (while
  11.   (setq e (ssname ss counter))
  12.   (setq st (cdr (assoc 1 (entget e))))
  13.   (setq sp(cdr (assoc 10 (entget e))))
  14.   (setq sl(cdr (assoc 7 (entget e))))
  15.   (princ st txt)
  16.   (princ "\n" txt)
  17.   (setq counter (+ counter 1)))
  18. (progn
  19.   (close txt)
  20.   (command "ed1" tftemp)
  21.   (command "erase" ss "")
  22.   (setq sp(getpoint "\nNew startpoint for text: "))
  23.   (if (= sp nil)(ederr))
  24.   (setq txt(open tftemp "r"))
  25.   (setq dt(read-line txt))
  26.   (command "text" "s" sl sp "" dt)
  27.   (while
  28.   (/= dt nil)
  29.   (setq dt(read-line txt))
  30.   (command "text" "" dt))
  31.   (close txt)
  32.   (princ))